#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    float amount;
    cin >> amount;
    if(amount < 0)
    {
        cout << "Invalid Value!";
    }
    else
    {
        float price = 0.53;
        float nprice = 0.53 + 0.05;
        float money;
        if(amount > 50)
            money = (amount - 50) * nprice + price * 50;
        else
            money = amount * price;
        cout <<"cost = " << fixed <<setprecision(2) << money ;

    }
}